//
//  LeftTableViewCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/8/3.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class LeftTableViewCell: BaseTableViewCell {
    
    var name : String?{
    
        didSet{
        
            if name != "-999" {
                
                rightLabel.text = name
                
            }
        
        
        }
    
    
    }
    
    
    @IBOutlet weak var redView: UIView!
    
    @IBOutlet weak var rightLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        rightLabel.textColor = UIColor.black
        
        rightLabel.highlightedTextColor = UIColor.red
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        contentView.backgroundColor = selected == true ? UIColor.white : UIColor.viewBgGrey()
        
        isHighlighted = selected
        
        rightLabel.isHighlighted = selected
        
        redView.isHidden = !selected
        
    }
    
}
